home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Skilluse.dxr / 00027_Explain answer.ls < prev    next >
Encoding:
Text File  |  1998-09-15  |  1.3 KB  |  21 lines

  1. property firstSprite, artSprite, buttonNum, questionNum
  2.  
  3. on beginSprite me
  4.   set the buttonNum of me to the spriteNum of me - (the firstSprite of me - 1)
  5. end
  6.  
  7. on mouseUp me
  8.   set vMemberString to "exp" & string(the questionNum of me) & string(the buttonNum of me)
  9.   set the member of sprite the artSprite of me to member vMemberString
  10.   set the loc of sprite the artSprite of me to point(230, 30)
  11. end
  12.  
  13. on getPropertyDescriptionList
  14.   set p_list to [#questionNum: [#comment: "Question number for this button:", #format: #integer, #range: [#min: 1, #max: 30], #default: 1], #firstSprite: [#comment: "First sprite of series:", #format: #integer, #default: 34], #artSprite: [#comment: "The hidden art sprite:", #format: #integer, #default: 48]]
  15.   return p_list
  16. end
  17.  
  18. on getBehaviorDescription
  19.   return "Each sprite will know its position in a group based on its sprite number." & RETURN & "It will also know what question it is applied to." & RETURN & "From these properties we can keep score in a global." & RETURN & "‚Ä¢ Question number - choose from the range." & RETURN & "‚Ä¢ First sprite - so the first sprite in the series gets a 1, etc." & RETURN & "‚Ä¢ Answer number - the number of the group within the answer." & RETURN & "NOTES:" & RETURN & "Uses global variable to keep track of button position, ON or OFF."
  20. end
  21.